<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <link rel="stylesheet" href="__CSS__/layui.css">
    <!-- <link rel="stylesheet" href="__CSS__/view.css"/> -->
    <!-- <link href="http://www.jq22.com/demo/jQueryTime-141124170801/css/lyz.calendar.css" rel="stylesheet" type="text/css" /> -->

    <title></title>
</head>
<body class="layui-view-body">
<div class="layui-content">

    <div class="layui-row">
        <div class="layui-card">
            <div class="layui-card-header">
                <div class="layui-page-header">
                    <div class="pagewrap">
                          <span class="layui-breadcrumb">
                            <a href="">首页</a>
                            <a href="">分润管理</a>
                            <a><cite>分润提现</cite></a>
                          </span>
                    </div>
                </div>
            </div>
            <form class="layui-form layui-card-body" name="form" action="" method="post">
                <div class="layui-form-item">
                    <label class="layui-form-label">结算卡</label>
                    <div class="layui-input-block">
                        <input type="text" readonly="readonly" autocomplete="off" class="layui-input" value="{$bank.list_name}">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">可提现金额</label>
                    <div class="layui-input-block">
                        <input type="text" readonly="readonly" autocomplete="off" class="layui-input" value="{$user['user_moeny']}">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">提现金额</label>
                    <div class="layui-input-block">
                        <input type="text" name="money" id="money" autocomplete="off" class="layui-input">
                        手续费：6%+2元
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <span class="layui-btn layui-btn-blue" lay-submit lay-filter="formDemo"
                              onclick="sub()">立即提交</span>
                        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<script src="__JS__/laydate.js?v=20171105"></script>
<script src="__JS__/layui.all.js"></script>
<script src="__JS__/layer/layer.js"></script>
<script src="__JS__/jquery.min.js"></script>
<script>
    layui.config({
        version: 20171105
    });
</script>
</body>
<script>
    function sub() {
        var money = $("#money").val();
        if(money<10){
            alert("提现金额不能小于10元");
            return false;
        }
        if(money%1){
            alert("提现金额必须是整数");
            return false;
        }
        $.post("{:Url('member/Profit/Putforward')}", $("form").serialize(), function (data) {
            if (data.error == 0) {
                layer.msg(data.msg, {time: 2000}, function () {
                    window.location.href = '';
                })
            } else {
                layer.msg(data.msg);
            }
        })
    }
</script>
</html>